package com.swsc.xapp.offline.lhttpd;

import com.yanzhenjie.andserver.error.HttpException;

public class ApiException extends HttpException {
    public ApiException(int statusCode, String message) {
        super(statusCode, message);
    }

    public static void thowException(int code, String message){
        throw new ApiException(code, message);
    }

    public static void isFalse(boolean flag, String message){
        if(flag){
            thowException(500, message);
        }
    }
}
